package com.neuedu.eldercarecenter.controller;

import com.neuedu.eldercarecenter.pojo.BackDown;
import com.neuedu.eldercarecenter.service.BackdownService;
import com.neuedu.eldercarecenter.utils.ResultVo;
import com.neuedu.eldercarecenter.vo.PageInfoVo;
import com.neuedu.eldercarecenter.vo.PageResponseVo;
import com.neuedu.eldercarecenter.vo.RequestBodyVo;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 出院管理
 */
@RestController
@RequestMapping("/backdown")
@Api(tags = "出院相关接口")
@Slf4j
public class BackDownController {
    @Autowired
    private BackdownService backdownService;
    //-:出院登记-显示客户信息
    //nursing-records-controller  /api/nursingrecords/queryCustomerInfo


    /**
     * 显示出院信息
     * @param requestBodyVo
     * @return
     */
    @PostMapping("/queryAllBackdownInfo")
    public ResultVo queryAllBackdownInfo(@RequestBody RequestBodyVo requestBodyVo){
        PageInfoVo pageInfoVo = requestBodyVo.getPageInfoVo();
        PageResponseVo<BackDown> backDowns = backdownService.queryAllBackdownInfo(pageInfoVo);
        return ResultVo.ok(backDowns);
    }

}
